<?php

namespace App\Http\Controllers\Pm;

use App\Http\Controllers\Pm\BasePmController;
use Illuminate\Http\Request;
use App\Common\Api\SystemCode;
use App\Common\Api\SystemMessage;

class HomeController extends BasePmController
{
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * check
     * @return mixed
     */
    public function check()
    {
        return response()->json([
            'code' => SystemCode::SYSTEM_SUCCESS,
            'message'=>SystemMessage::SYSTEM_SUCCESS,
            'data'=>[
                'version'=>'larevel '.app()->version(),
                'server_software'=>$_SERVER['SERVER_SOFTWARE'],
                'db'=>$_SERVER['DB_CONNECTION'],
                'datetime'=>date("Y-m-d H:i:s"),
            ]
        ])->setStatusCode(200);
    }

}
